﻿@{
    string controller = HttpContext.Current.Request.RequestContext.RouteData.Values["controller"].ToString();
    string action = HttpContext.Current.Request.RequestContext.RouteData.Values["action"].ToString();

    if (action.EndsWith("Popup"))
    {
        Layout = "~/Views/Shared/_LayoutPopup.cshtml";
    }   
    else if (controller == "Account")
    {
        Layout = "~/Views/Shared/_LayoutLogin.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
}